import random


class Game:
    top_score = 0

    def __init__(self, player_name):
        self.player_name = player_name

    @staticmethod
    def show_help():
        print("显示游戏帮助信息...")

    @classmethod
    def show_top_score(cls):
        print(f"历史游戏最高分{cls.top_score}")

    def start_game(self):
        score = random.randint(10, 100)
        print(f"玩家{self.player_name}本次游戏得分{score}")
        if Game.top_score < score:
            Game.top_score = score


if __name__ == '__main__':
    Game.show_help()
    Game.show_top_score()
    # 创建游戏对象
    xiaoming = Game("xiaoming")
    # 第一次玩游戏
    xiaoming.start_game()
    xiaoming.show_top_score()
    # 第二次玩游戏
    xiaoming.start_game()
    xiaoming.show_top_score()

